<template>
    <views class="facilitator_list_add">
        <!-- 基本信息 -->
        <facilitator-base v-show="first" :type=1   @submitBaseInfo="submitBaseInfo"></facilitator-base>

        <!-- 费率设置 -->
        <facilitator-rate v-show="second" :type=1 :facilitator_id_add="facilitator_id" @submitRate="submitRate"  ></facilitator-rate>

        <!-- 账户详情 -->
        <facilitator-param-detail v-show="third" :type=1 :facilitator_id_add="facilitator_id" @submitParam="submitParam"  ></facilitator-param-detail>

    </views>
</template>

<script>
    import FacilitatorBase from 'components/facilitator/facilitator_list/child_component/child_component/facilitator_base';
    import FacilitatorRate from 'components/facilitator/facilitator_list/child_component/child_component/facilitator_rate';
    import FacilitatorParamDetail from 'components/facilitator/facilitator_list/child_component/child_component/facilitator_param_detail';

export default {
    name:"facilitator_list_add",
    components: {
        FacilitatorBase,
        FacilitatorRate,
        FacilitatorParamDetail
    },
    data(){
        return {
            first: true,
            second: false,
            third: false,
            facilitator_id:0
        }
    },
    mounted(){
        this.$setRouteTitle();
    },
    methods:{
        submitBaseInfo(facilitator_id){       //新增服务商基本信息 saveFacilitator
            this.first = false;
            this.second = true;
            this.facilitator_id = facilitator_id;
        },
        submitRate(){
            this.second = false;
            this.third = true;
        },
        submitParam(){
            this.$message.success('编辑成功');
            this.$blackRoute({ path: "/facilitator_list", query: {}, that: this }); // 返回指定路由-删除标题栏

            // this.$route.push({path: '/facilitator_list'});
        }
    }
}
</script>

<style lang="less" :scope="true" src="@/style/facilitator/facilitator_list_add.less">

</style>>